<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>xj</title>
	</head>
	<body>
		<script>
			var arr = [200,100,240,45,2,68,3];
			document.write("<p>数组为：{" + arr + "}</p>");
			/*function a(b,c){
				return b - c;
			}*/
			var max = arr[0];
			var min = arr[0];
			for(var i=0;i<arr.length;i++){
				var cur = arr[i];
				if(cur>max){
					max = cur;		
				}
				if(cur<min){
					min = cur;		
				}
			}
			document.write("<p>最大值为：" + max + "。</p>")
			document.write("<p>最小值为：" + min + "。</p>")
		</script>
	</body>
</html>
